home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 August / macformat-027.iso / mac / Shareware City / Developers / Oberon⁄F / Manuals / User Guide (Macintosh) (.txt) < prev    next >
Encoding:
Oberon Document  |  1994-12-19  |  97.1 KB  |  955 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Geneva
  16. TextRulers.StdRulerDesc
  17. TextRulers.RulerDesc
  18. TextRulers.StdStyleDesc
  19. TextRulers.StyleDesc
  20. TextRulers.AttributesDesc
  21. Geneva
  22. Geneva
  23. Geneva
  24. Geneva
  25. Geneva
  26. StdClocks.StdViewDesc
  27. Geneva
  28. Geneva
  29. Geneva
  30. TextControllers.StdCtrlDesc
  31. TextControllers.ControllerDesc
  32. Containers.ControllerDesc
  33. Controllers.ControllerDesc
  34. Geneva
  35. Geneva
  36. Geneva
  37. is a view is a 
  38. Geneva
  39. Geneva
  40. DevCommanders.StdViewDesc
  41. DevCommanders.ViewDesc
  42. Geneva
  43. Geneva
  44. TRAP 0
  45.  <> Demo.Trap   [00000042H] <>
  46.     local    INTEGER    42
  47.  <> StdInterpreter.CallProc   [00000FD7H] <>
  48.     m    POINTER    [0055D0E4H]
  49.     mn    Kernel.Name    "Demo"
  50.     mod    StdInterpreter.Ident    "Demo"
  51.     p    PROCEDURE    Demo.Trap
  52.     pn    Kernel.Name    "Trap"
  53.     proc    StdInterpreter.Ident    "Trap"
  54.  <> StdInterpreter.Command   [00001C37H] <>
  55.     left    StdInterpreter.Ident    "Demo"
  56. Geneva
  57. Geneva
  58.     global    CHAR    "x"
  59. Geneva
  60. Geneva
  61. StdDialog.HandleItem:i^
  62. [0043F08CH]    StdDialog.ItemDesc
  63.      .next    StdDialog.Item    NIL
  64.      .item    POINTER    [0043F34CH] <>
  65.      .string    POINTER    [0043F36CH] <>
  66.      .filter    POINTER    [0043F38CH] <>
  67.      .shortcut    ARRAY 8    ""
  68.      .privateFilter    BOOLEAN    FALSE
  69.      .failed    BOOLEAN    FALSE
  70.      .trapped    BOOLEAN    FALSE
  71.      .res    LONGINT    0
  72. Geneva
  73. Geneva
  74. Geneva
  75. MENU "Dev"
  76.     "Insert Stamp"    ""    "StdStamps.Deposit; PasteView"    "PasteViewGuard"
  77.     SEPARATOR
  78.     "Compile"    "K"    "DevCompiler.Compile"    "TextCmds.FocusGuard"
  79.     "Compile Selection"    ""    "DevCompiler.CompileSelection"    "TextCmds.SelectionGuard"
  80.     SEPARATOR
  81.     "Unmark Errors"    ""    "DevMarkers.UnmarkErrors"    "TextCmds.FocusGuard"
  82.     "Next Error"    "E"    "DevMarkers.NextError"    "TextCmds.FocusGuard"
  83.     "Toggle Error Mark"    ";"    "DevMarkers.ToggleCurrent"    "TextCmds.FocusGuard"
  84.     SEPARATOR
  85.     "Insert Commander"    ""    "DevCommanders.Deposit; PasteView"    "PasteViewGuard"
  86.     "Execute"    ""    "DevDebug.Execute"    "TextCmds.SelectionGuard"
  87.     "Unload"    ""    "DevDebug.Unload"    "TextCmds.SelectionGuard"
  88. Geneva
  89. Contents
  90. Introduction     5
  91.     Document Windows, Tool Windows, Auxiliary Windows     5
  92. Installation     7
  93.     Files     7
  94.     Folders     7
  95. The Text Subsystem     8
  96.     Creating, Opening, Closing, Saving, and Printing Text Documents     8
  97.     Basic Editing     8
  98.     Navigation Keys     9
  99.     Drag & Drop     9
  100.     Drag & Pick     9
  101.     Text Views as Containers     9
  102.     Text Setting    11
  103.     Text Rulers    11
  104.     Finding and Replacing    12
  105.     Export as Ascii    12
  106. The Development Subsystem    13
  107.     Compiling Oberon Modules    13
  108.     Browsing Tools    14
  109.     Loading and Unloading Modules    14
  110.     Executing Commands    14
  111.     Debugging    15
  112. The Forms Subsystem    17
  113.     Control Properties Inspector    17
  114.     Menu Configuration    18
  115.     String Resources    21
  116. Subsystems and Global Modules    22
  117. Distribution    24
  118. How to Develop Oberon/F Components    25
  119. Standard Commands    27
  120.     File Menu    27
  121.     Edit Menu    28
  122.     Font Menu    29
  123.     Attributes Menu    29
  124.     Windows Menu    31
  125. Custom Commands    32
  126.     Controls    32
  127.     DevAlienTool    32
  128.     DevBrowser    33
  129.     DevCmds    33
  130.     DevCommanders    33
  131.     DevCompiler    34
  132.     DevDebug    34
  133.     DevMarkers    35
  134.     DevInspector    35
  135.     FormCmds    35
  136.     HostCmds    36
  137.     StdClocks    37
  138.     StdControlCmds    37
  139.     StdMenuTool    38
  140.     StdStamps    38
  141.     TextCmds    38
  142.     TextRulers    40
  143. Introduction
  144. This document serves as a user's guide for Oberon/F programmers. It is not intended as a manual for the end user of software written in Oberon/F. Knowledge of the Macintosh user interface guidelines is assumed.
  145. With Oberon/F, there are no separate environments for developing programs, for testing and debugging programs, or for the the distribution of programs. Instead there is only one, truly integrated, environment for all these purposes. A distribution version of an Oberon application is created simply by stripping away all tools which are specific to the development process (see section "Distribution" in this documentation).
  146. Development tools must not be distributed. However, all other parts of Oberon/F may be freely distributed along with applications, without royalties or other fees.
  147. Such a customized Oberon/F environment always has the basic capabilities of Oberon/F's compound document architecture, and of the standard text and forms subsystems. Furthermore, it constitutes a standard Macintosh application, where the (boot) application can be double-clicked, where documents can be dropped onto the application icon to open them, etc.
  148. "Native" applications which are only developed under, but not based on, Oberon/F can be developed as well. For this purpose, a linker tool is provided. Normally, Oberon modules are linked and loaded dynamically, such that a separate linker is not strictly necessary. However, it is possible even for pure Oberon/F applications to link all or some of their modules together, in order to reduce the number of files to distribute. For further information about this topic, refer to the document "Oberon/F, Macintosh, Platform-Specific Issues".
  149. When working in the Oberon/F environment for the first time, the following may be helpful to remember: Almost all modifications to Oberon/F documents are undoable, making it quite safe to try out a feature. In general, multi
  150. level undo/redo is available, i.e. not only one, but several commands can be undone (as many as memory permits).
  151. Whenever the system is working on the completion of some command for more than a fraction of a second, Oberon/F changes the cursor to a special busy cursor sequence. However, this does not guarantee that the executing program does make any progress. For example, the busy cursor will keep advancing, even if the program entered an endless loop. Use command-option-. to terminate such a program (note that it may take a few seconds before you see a reaction).
  152. Document Windows, Tool Windows, Auxiliary Windows
  153. There are three kinds of windows in Oberon/F: document windows, tool windows, and auxiliary windows. A document window may contain e.g. a text or a form layout, or your custom view object type. When the contents of a document window has been modified (made "dirty") and the user tries to close the window (or quit the application), the system asks the user whether the document should be saved.
  154. A tool window allows to invoke actions on some document window underneath it, typically such a tool is a modeless dialog. Tool windows look the same way as any modeless dialog on the Macintosh, i.e. the same way as a document. In order to avoid confusion, the titles of tool windows are put in "<<" and ">>" brackets.
  155. Auxiliary windows are used mainly to hold temporary data for information purposes, e.g. the output of a browser. The contents of an auxiliary window may be editable, but the system doesn't ask whether a modified auxiliary window should be stored, i.e. it is temporary in nature. The Log window (which is not available for application distribution) is an example of such an auxiliary window. Auxiliary windows can be recognized by their "[" and "]" brackets around their titles.
  156. The contents of any Oberon/F window can be viewed in several other windows simultaneously (using the New
  157. Window command in the Windows menu). In contrast to their primary window, all additional windows created in this way can be recognized by the "(" and ")" brackets around their titles, regardless of whether they are document, tool, or auxiliary windows.
  158. If the primary window is not a document window, the system doesn't ask whether its contents should be saved upon closing, even if its contents had been modified in some way.
  159. Document and auxiliary windows may have scroll bars. A window with scroll bars is resizable; note however that resizing a window only changes how much of its contents are visible, but never changes the contents (e.g. how text is set) itself. 
  160. Installation
  161. Start the Oberon
  162. installer application on disk number 1. The installer will lead you through the installation procedure.
  163. Oberon/F requires a Macintosh with a MC68020 or better, with Mac OS 7.0 or higher, and a floating point unit (FPU) or FPU emulator. If you don't have an FPU please read the Read
  164. Me (SoftFPU) file in the Oberon folder.
  165. The resulting Oberon folder contains several files and folders:
  166. Files
  167. Oberon/F    The completely linked Oberon/F application.
  168. Oberon/X    A partially linked Oberon/F application.
  169. Demo    A demonstration text.
  170. Read Me    Release notes and copyright notice.
  171. Read Me (SoftFPU)    Information about a third-party floating-point emulator.
  172. Welcome    This text is used as input by some of the tutorial examples.
  173. Folders
  174. Code    This folder is empty. After the compilation of a global module, its code file is
  175.     placed here.
  176. Dev    This folder contains the resources of the development subsystem. The
  177.     subsystem's code is linked into Oberon/F (not into Oberon/X) and not available
  178.     as separate code files.
  179. Docu    This folder is empty. Documentation for global modules can be placed here.
  180. Form    This folder contains the forms subsystem with the visual designer.
  181. Host    This folder contains private code of Oberon/F.
  182. Mac    This folder contains interface modules for direct Toolbox and Mac OS access.
  183. Manuals    This folder contains on-line documentation not specific to a particular module or
  184.     subsystem.
  185. Omosi    This folder contains an example view class.
  186. Omosi Docs    This folder contains documents created with Omosi views.
  187. Rsrc    This folder is empty. Resources (dialogs, strings) for global modules may be put
  188.     here.
  189. Samples    This folder contains the example files of "Oberon/F, Framework, Quick Start and
  190.     Quick Reference".
  191. Std    This folder contains private code of Oberon/F.
  192. Sym    This folder is empty. After the compilation of a global module, its symbol file is
  193.     placed here.
  194. System    This folder contains the core of Oberon/F.
  195. Text    This folder contains the text subsystem, with the standard document/program
  196.     editor.
  197. Tutorial    This folder is empty. If the tutorial examples are compiled, their symbol / code
  198.     files are placed here.
  199. The Text Subsystem
  200. The text system is intended to support tasks of program writing and documentation, but also provides basic abstractions that can be used by every application which needs editable texts. For this reason, the text system is part of the standard configuration of Oberon/F.
  201. It is currently not intended to cover all subtle features of a standard word processing application. However, the system can be used for many tasks that would usually ask for a word processor. Furthermore, the unique extensibility of Oberon allows for customization and extension of the text system with few principal limitations.
  202. The following covers the user interface of the text system, not its application programming interface. For an introduction to the programming interface consult the manual "Oberon/F, Framework, Tutorial and Reference" or "Oberon/F, Framework, Quick Start and Quick Reference".
  203. Creating, Opening, Closing, Saving, and Printing Text Documents
  204. As for other applications, the File menu is used for these purposes. By convention, document names on the Macintosh contain no extension such as ".Mod" or ".ODC".
  205. To open a document use Open... from menu File. When holding down the option
  206. key before selecting Open..., arbitrary files can be opened. If such a file is not an Oberon/F document, it will be converted if a converter is available. Currently, converters for Macintosh TEXT, Macintosh PICT, and ETH Oberon V2 and V4 text files are installed. If the file is not of any such type, it is interpreted as plain ASCII text.
  207. To create a new document, the command New (menu File) can be used. It opens a window containing an editable text. Custom menu commands may allow to open windows with other contents than text. For an introduction on how to edit the menu configuration see section "Menus" further below.
  208. Basic Editing
  209. Oberon/F text views either display a selection or an insertion point (the caret). Text stretches are selected by clicking at one end of the stretch and then moving the cursor over the stretch to the other end. Words may be selected by double
  210. clicking them. Double clicking outside of a text view to the left or right of a line can be used to select whole lines. (This does not work for embedded text views.) Also, an existing selection may be extended or reduced by holding down the shift
  211. key when clicking. Typed text appears at the insertion point if there is any, otherwise it replaces the selection. The delete key either clears the selected text, or deletes the character to the left of the insertion point.
  212. The attributes of selected text can be modified using the Font and Attributes menus. In addition to these system attributes, texts also support vertical offsets of individual characters. These can be manipulated using the commands Superscript and Subscript from menu Text.
  213. Sometimes it is useful to view two or more portions of the same text simultaneously, e.g. to make a large selection by setting the caret in one view to the start of the stretch to be selected and then shift
  214. clicking at the end of that stretch in the other view. New
  215. Window in menu Windows can be used to obtain an additional view onto the current front window. Open
  216. Window is similar except for opening a view onto a part of the current front window, the so-called focus view.
  217. Navigation Keys 
  218. Arrow keys can be used to move the insertion point to the left, right, upwards, or downwards. If the option-key is pressed before the left/right arrow key, the insertion point is moved by word, not by character. If the option-key is pressed before the up/down arrow key, the insertion point is moved by paragraph, not by line. If the shift-key is pressed before an arrow key, the current selection (or insertion point) is extended or shrinked. Both modifier keys may be used together as well. The navigation keys on the extended keyboards (Page up/down, Home, End) may be used to scroll by one page at the time, or to the beginning/end of a document.
  219. Drag & Drop
  220. When clicking into an already selected text stretch without moving the cursor out of that selection, the selection is removed and the insertion point set instead. However, by moving the cursor out of the text selection while still holding down the mouse button, the selected text stretch is dragged to another place. When releasing the mouse button over a suitable position, the selected stretch is dropped. (If the target position is not able to consume a text stretch, e.g. in a window's scrollbar, nothing happens.) By dragging a piece of text and dropping it to a new place, the text piece is moved to the new place. By holding down the option
  221. key while dragging, the dropped piece is a copy of the dragged one: A copy of the selected piece is inserted at the new place. When crossing document boundaries the dragged object is always copied, regardless of whether the option
  222. key is held down or not.
  223. If you move the cursor over a partially obscured window while dragging, the window comes to the top when you don't move the cursor for a second or two. When dropping, the window containing the drop destination comes to the top, if it isn't there already.
  224. Drag & drop currently works within Oberon/F only, not with the Finder or other applications.
  225. Drag & Pick
  226. A novel feature of Oberon/F is the capability to drag a selected object to another place in order to pick up attributes. The text system uses this facility to support setting the text attributes of a selected piece of text to those used by any other visible text stretch. To drag & pick, hold down the control
  227. key while dragging.  Like drag & drop, drag & pick also works across windows. During dragging, obscured windows come to the top in a similar way as with drag & drop. However, after picking always the source window comes to the top again; not the destination as with drag & drop.
  228. Text Views as Containers
  229. A text may contain arbitrary Oberon/F views, directly floating in the stream of characters. For example, the current date and time is displayed by a standard clock view: 
  230. Not only simple and small views like the above clock may float in a text; any view is possible. A few lines below you can see a text view embedded in this text; the embedded text view itself contains two other text views. To see where there are embedded views in a window, you can click in the window's title bar while holding down the option
  231. A container view is a view which may contain arbitrary other views, text views are examples of container views. A container view contains intrinsic contents (in this case, text pieces), and views. Both intrinsic contents and views may be selected, e.g. if you are reading this text on-line, you may select all its contents, including all the text and the various views floating in it (try Select
  232. All in the Edit menu). However, at times you may want to select exactly one view, which is then called a singleton. Singletons show in a distinguished way that they are selected: with an outline around the view, and with handles if the view is resizable.
  233. The view which contains the current selection, or the caret, is called the current focus. Except the outermost view, the focus and all the views in which it is contained show focus borders: two dotted outlines around a view. Note that a focus is not a selection, rather it may contain the selection. However, a focus can be turned into a singleton by clicking into its focus border.
  234. If several views are nested, the user can focus the innermost simply by clicking into it. This mechanism of directly clicking into the contents of an embedded view is called trans
  235. clicking. It is especially handy when dealing with views nested several levels deep: 
  236. Of course, sometimes it is necessary to edit the text surrounding an embedded view. For example, selecting the embedded view itself, instead of selecting something inside the embedded view, makes it necessary to disable trans
  237. clicks. This can be done by holding down the command
  238. key when clicking. To select the outermost text view embedded in a document, use the command Select
  239. Document in menu Edit. Note that this is different from Select
  240. All, which merely selects the focus' contents. In a container, the focusing of one of its embedded views can be prevented altogether, using the Prevent
  241. Subfocus command in the Dev menu. This can be convenient in a graphical container which is meant for layout editing, e.g. in the forms editor used for dialog layouts.
  242. An embedded view can be resized, if it allows this. To resize such a view, it needs to be selected first, as a singleton. Once it is selected, graphical handles appear that can be dragged to interactively resize the view. The view may enforce constraints on legal sizes - this is immediately visible while resizing the view. By holding down the shift
  243. key when resizing, two opposite handles can be dragged simultaneously, effectively turning the resize into a move in the area of the containing view. (For some containers, such as text, free moving does not make sense. In this case the move operation will have no visible effect.)
  244. To scroll an embedded (focused) view, hold down the option
  245. key when the cursor is over a scroll bar.
  246. Note that the clipboard supports two different paste operations, represented by Paste and Paste
  247. Object in the Edit menu. While Paste tries to merge the clipped model (the data structure displayed by the view in the clipboard) into the destination, Paste
  248. Object always pastes the entire view, creating an embedded view. Paste succeeds in merging clipped and destination model, if both are of the same kind. (For example, a text stretch copied into the clipboard is actually carried by a text view held by the clipboard. When pasting into another text, the text view in the clipboard is ignored and the clipped text is directly inserted into the destination text.) If on the other hand the models of clipboard and focus are incompatible, Paste operates the same way as Paste
  249. Object. In addition to Paste
  250. Object, the command Paste
  251. Window can be used to open a new document containing a copy of the view currently held by the clipboard.
  252. Drag & drop always follows the semantics of Paste, i.e. it tries to merge the dragged object into the drop target. (This is the common case when moving model pieces around within a view.) In order to avoid merging of objects, the clipboard can be used: Cut and Paste
  253. Object or Copy and Paste
  254. Object to replace drag & drop.
  255. Text Setting
  256. A text may contain plain characters, embedded views, and various control characters. Control characters and text
  257. aware views affect the way a text stretch is set into a text view: a TAB (inserted using the tab key) forces the next word to the next tab stop, a LINE (inserted using the return or enter key) ends a line and continues setting on the next, a PARA (inserted using command New
  258. Paragraph from menu Text) ends a line and also a paragraph, causing begin
  259. of-paragraph formats to be applied to the next line. If a TAB is entered in a text for which there is no tab stop to the right of the caret, the TAB acts as a fixed-width space.
  260. TABs at the beginning of a line can be used to control the indentation of structured text, such as programs. After a LINE is entered and the previous line has started with TABs, the new line will start with the same number of tabs (auto indentation). The commands Shift
  261. Left and Shift
  262. Right (menu Text) modify the indentation of a selected range of lines. Note that these indentation aids only work if you use TABs for indentation, but not spaces.
  263. Special hyphens can be used to control the breaking of words. A standard hyphen, such as in Standard
  264. Hyphen (inserted using option
  265. -) allows for word breaking, just as a soft
  266. hypen (inserted using command Insert
  267. Hyphen from menu Text) does. While standard hyphens are always visible, soft
  268. hyphens are only displayed when actually activated to break a word at the end of a line. Non
  269. breaking hyphens as in "Non
  270. Breaking
  271. Hyphen" (inserted using command Insert
  272. Hyphen from menu Text) prevent breaking a word after the hyphen. Non
  273. breaking spaces (inserted using option
  274. space) prevent breaking words and must be used for spaces which should be underlined. A digit space is the same as a non-breaking space but with a width equal to the digit "0" of the same font. If you use a font with monospaced digits, you can use digit spaces to right-adjust numbers (command Insert
  275. Digit
  276. Space in menu Text).
  277. Text Rulers
  278. The most prominent text
  279. aware views that affect text setting are TextRulers. Every text view provides an invisible default ruler that controls the setting of text in the absence of normal rulers. A new ruler can be inserted using command Insert
  280. Ruler from menu Text. Rulers and PARA characters are usually invisible; the command Show
  281. Marks / Hide
  282. Marks (menu Text) can be used to make both visible.
  283. Note that the setting of a paragraph (right margin, etc.) is only determined by its ruler (the default ruler, if there is no other), and not by the text view's size.
  284. A ruler has two active (clickable) areas: an icon bar at the top, and a tab stop and margin marking bar at the bottom. A passive scale is displayed in the middle. The leftmost icon allows resetting the first line indentation, left, and right margins to values within the range of the currently visible view part. This is especially useful when dealing with embedded text views of limited size. At the left end are three icons to adjust the line grid, where clicking the left icon decrements and clicking the right icon increments the line grid. Between these two icons the actual line grid setting is shown in points; a value of 1 signals that the line grid has been disabled. This icon can be selected to set the line grid directly using the size entries in the Attributes menu. By default, the line grid is disabled (set to 1).
  285. Note that enabling a line grid can have unexpected results, especially if you successively increment or decrement it by clicking on the line grid icons. Since lines are always forced to lie on the grid, small changes of the line grid or of the font size may force a line to jump one whole line up or down.
  286. The next four icons allow to set the formatting mode. Possible modes are: flush left, centered, flush right, and fully justified. The current mode's icon is high
  287. lighted. The next icon triple allows adjustment of the lead space inserted before every paragraph. Note that new paragraphs are begun by inserting either a ruler or a PARA character. A plain LINE character (inserted using the return key) does not begin a new paragraph! Finally, the last icon can be used to force a page break just before the ruler when printing.
  288. The tab stop and margin marking bar supports direct manipulation of its components. Two half
  289. triangles at the left end are used to control the indentation of the first line of every paragraph and the left margin. A triangle at the right end controls the right margin. Small up
  290. pointing triangles show positions of tabulator stops. New tab stops can be set by clicking into empty areas of the marking bar; old tab stops can be removed by dragging them out of the ruler. Single tab stops can be moved by dragging them; all tabs stops to the right of and including the dragged one can be moved by holding down the option
  291. key while dragging.
  292. If you want to change the invisible default ruler, insert a new ruler, then set it up as you like, select the whole ruler, and then execute Make
  293. Default
  294. Ruler in menu Text. Similarly, if you want to change the default attributes (font, etc.) of a text, type some text, set its attributes to the desired values, and then execute Make
  295. Default
  296. Attributes in the Text menu. In this way, you can prepare (possibly empty) template texts (stationaries) with suitable formatting and attributes as defaults.
  297. Finding and Replacing
  298. The menu entries Find
  299. Replace... and Find
  300. Again from the menu Text can be used to open dialogs that support finding and replacing text pieces, and for repeated finding, respectively. Text may be found in a case sensitive or insensitive way (check box ignore
  301. case), and the search pattern may be restricted to only match word beginnings, word endings, or both (check boxes word
  302. begins
  303. with and word
  304. with). The latter case limits the search to word matches.
  305. All replacing actions, including Replace
  306. All, which replaces all matching fragments from the current position to the end of the text, can be undone. The replacement always adopts the text attributes of the (first character of the) replaced fragment.
  307. Again searches for the currently selected string, starting from the end of the selection. If there is only a caret, it searches for the previously used string starting at the caret position. Thus Find
  308. Again can be applied even without ever using the Find
  309. Replace... dialog.
  310. If a string is not found from the current position to the end of the text, a beep sound is emitted. If the same operation is executed again, the search is started at the beginning of the text.
  311. Export as Ascii
  312. The text contained in the focus text view can be translated and saved into a Macintosh Ascii format file, with type "TEXT" and creator "obnF". Use command Export
  313. Ascii... in the Text menu.
  314. The Development Subsystem
  315. Compiling Oberon Modules
  316. Besides consuming stored text documents, the Oberon compiler can compile modules from anywhere in any displayed text document. If the beginning of a diplayed text is also the beginning of a module, the command Compile in the menu Dev can be used to compile the module. If the module begins somewhere in the middle of a displayed text, its beginning can be selected, e.g. by double
  317. clicking on the keyword MODULE, and then the command Compile
  318. Selection in the menu Dev can be used.
  319. To compile a list of modules at once, a list of module names needs to appear in some displayed text, e.g.
  320.  FormModels FormViews FormControllers FormCmds
  321. By selecting the part of the list that should be considered by the compiler and by invoking the command Compile
  322. Module
  323. List from menu Dev, the listed modules are compiled consecutively. The process stops as soon as an erroneous module has been encountered. The compiler reports on the success or failure of compilations by writing into the system log. The log is a special text displayed in an auxiliary window. It can be opened using Open
  324. Log and cleared using Clear
  325. Log, both from menu Info.
  326. The log is a development tool, i.e. it should be used for debugging purposes and for development tools only. End-user applications are not expected to display a log. Whether or not a log window is opened upon startup of Oberon/F is determined by the configuration's Config module (in folder "System:Mod"). This module can be changed by the programmer as desired; by default it only contains one statement, which opens the log.
  327. Module
  328. List is a convenient command in menu Dev, which opens the module sources of one or several modules: select a module name, e.g. Config, and then execute Open
  329. Module
  330. List. This command can save you much time when you work with multiple subsystems (-> Subsystems and Global Modules) at the same time.
  331. When compiling a newly created or a modified module, direct compilation of the displayed program text is recommended. In addition to writing to the system log, the compiler then also inserts error markers into the source text and places the caret after the first marker. Each marker represents an error flagged by the compiler in the source text. Normally, a marker is displayed as a crossed
  332. out box. However, simply by clicking into it, a marker expands to display the corresponding error message. If the insertion point is directly behind a marker, it can be expanded via the command Toggle
  333. Error
  334. Mark from the Dev menu (or more likely via its keyboard equivalent).
  335. The command Next
  336. Error (menu Dev) can be used to skip forward to the next marker. Unmark
  337. Errors removes all remaining markers from a text. However, the latter is rarely required: The compiler automatically removes all old markers when re
  338. compiling a text; and when storing a text, contained markers are filtered out, i.e. do not appear anymore when the text is re-opened.
  339. If a compiled module contains one or several errors, the text is scrolled to the first one. If this doesn't happen, the module was successfully compiled. In addition to this feedback, the compiler writes the number of errors found to the log, if there are errors. If the module interface has changed compared to a previous version, the changes are listed in the log as well.
  340. The successful compilation of a module yields two files: a symbol file and a code file. A symbol file contains the information about a module's interface, and is used by the compiler to check imported modules for consistency. The code file represents the generated code (Motorola 68020 code on the Macintosh). The contents of a code file is linked and loaded dynamically when needed, thus there is no need for a linker.
  341. Symbol files are only needed during development (used by the compiler and the interface browser), they are not needed to run modules. A symbol file is a special encoding of a module's interface, i.e. of its exported constants, variables, types, and procedures. If the interface of a module is changed and the module recompiled, a new symbol file is written to disk. When compiling a module, the compiler reads the symbol files of all modules imported. This information is used to generate code, but also to type-check the correct use of imported identifiers. After the interface of a module has been modified, all modules importing it (i.e. all its clients) must be recompiled. Only those modules need to be recompiled which actually use the feature which has been changed. A mere addition of features does not invalidate the clients of a module: if you export a further procedure, for example, no clients need to be recompiled. This also holds for constants, variables, and types, but not for type-bound procedures. The latter is considered not an extension, but rather as a modification of an interface, and thus may invalidate clients.
  342. Code files are produced, but never read during development. They are necessary to run modules, i.e. the dynamic (linking) loader must be able to read them.
  343. Browsing Tools
  344. A common cause of compile
  345. time errors is the wrong use of interfaces. To quickly retrieve the actual definitions of items exported by modules, the browser may be used. The interface of a whole module is displayed when selecting the name of a module and executing Interface from menu Info. To display the definition of an individual item, e.g. a type or procedure, the qualified name of that item, i.e. "module.item" should be selected with the same command. The browser displays its output in a form that can directly be used as input for further browsing actions.
  346. Two related commands, Source and Documentation from menu Info, allow to look up an item's definition in a source file, or in an on-line documentation, respectively. They also work both on selected module names as well as on names in the form "module.item".
  347. Loading and Unloading Modules
  348. Once a module passes the compiler it can be loaded into the system and used. The list of all currently loaded modules is displayed by Loaded
  349. Modules (menu Info). In order to use a new version of a module that is already loaded, the module needs to be unloaded first. Command Unload (menu Dev) takes a focused module source as input and tries to unload the corresponding module. Unload fails if the module is still in use, i.e. if it is imported by at least one other module that is still loaded. (In general, modules can only be released top down.) The command Unload
  350. Module
  351. List takes a selection as input, which must consist of a sequence of module names.
  352. Executing Commands
  353. There are several ways to execute commands (i.e. parameterless procedures exported by Oberon modules) within Oberon/F. A command name can be written into a text, as a string of the form "module.procedure", selected, and executed using Execute in menu Dev. An easier way is to precede the command name with a commander: menu Dev provides an entry Insert
  354. Commander. Clicking on a commander interprets the string following it as a sequence of commands, e.g.
  355.  "Dialog.Beep; DevDebug.ShowLoadedTopModules"
  356. If the string consists of only one command, the string delimiters may be omitted, e.g.
  357.  Dialog.Beep
  358. With such simple commands, it is possible to combine the unloading of an old version with the execution of a new version of a command (resp. of its module): option-click on the commander causes the command's module to be unloaded, and then the new module version is loaded and the procedure executed. Note that this only works for top-level modules, i.e. for modules which are not imported by any other modules.
  359. Debugging
  360. When a run-time error occurs, e.g. a division by zero or some assertion trap, a trap window is opened. Such a window contains a text which shows the stack contents at the time when the trap occurred. An extract of such a trap text is shown below:
  361. In the first line, the trap number is given, e.g. TRAP 0. Further below, a sequence of procedure activations is given, e.g. the last active procedure (where the trap occurred) was Demo.Trap, which had been called by StdInterpreter.CallProc, which had been called by StdInterpreter.Command, etc. Each procedure is marked with a small diamond mark to the left of its name. Clicking on this diamond mark produces a new window which shows the global variables of the module in which this procedure is defined, e.g.
  362. The diamond mark to the right of a procedure opens the source of the module in which this procedure is defined, selects the statement which has been interrupted, and scrolls to this selection.
  363. But now let us go back to the stack display. The lines below a procedure's name show the parameters and local variables of the procedure, sorted alphabetically. The following example
  364.   pn    Kernel.Name    "Trap"
  365. means that a local variable pn of type Kernel.Name had the value "Trap" when the trap occurred. After a pointer variable, a diamond mark allows to follow the pointer to the record to which it points, e.g. the pointer i
  366.   i    StdDialog.Item    [0043F08CH] 
  367. can be followed (by clicking on the diamond mark) to the record
  368. Such a display is opened in another window. The fields of a record are indicated by the preceding ".". On the first line, the path you have followed is indicated. If you have followed more than one dereferencing step, a diamond mark at the right end of this line lets you trace back again step by step.
  369. It should be noted that at no time during debugging the normal Oberon/F environment is left, there is no special "debugging mode" or "debugging environment"; everything is integrated instead!
  370. It is typical for object-oriented programs that their control flows can become extremely convoluted and hard to follow. Thus following a program statement for statement (single step), by message sends, or by procedure calls in practice turns out to be unpractical for debugging large systems. Instead, Oberon/F uses a more effective debugging strategy:
  371. Let errors become manifest as soon as possible.
  372. Instead of waiting for some error to occur, and then trying to find one's way backward to the cause of the error, we attempted to flag errors as closely to their cause as possible. This is the only way to truly save debugging time. The language implementation follows the same strategy, by checking index overflows when accessing arrays, by checking NIL accesses when dereferencing a pointer, etc. In addition to these built-in checks, Oberon/L provides the standard procedure ASSERT, which allows to test for an arbitrary condition. If the condition is violated, a trap window is opened. Oberon/F procedures consequently use assertions e.g. at the beginning of a procedure to check whether its input is valid. This prevents that a procedure with illegal input may perform any damage to the rest of the system.
  373. This stategy has proven itself again and again during the development of Oberon/F, and is strongly recommended for serious development work.
  374. The Forms Subsystem
  375. The command New
  376. Form... in menu Dev creates dialogs and other forms that match exported global variables. It is important to notice that the created form is non
  377. modal. Almost all dialogs in Oberon/F are non
  378. modal, as long as the conventions for the underlying platform permit.
  379. To get started, enter "TextCmds.find" into the link field of the New
  380. Form dialog. By clicking the Create button, a dialog is automatically created which has fields find and replace, and buttons like FindNext and ReplaceAll. These fields and buttons directly match the record fields of variable find in module TextCmds. To verify this, select the string "TextCmds.find" , and execute command Interface in menu Dev. The browser will display the definition of the record type.
  381. The dialog created by New
  382. Form... exhibits a simple default arrangement of control elements, shown as an editable layout. The elements of such a layout may be re-arranged, renamed, or otherwise modified using the menus Layout and Controls. These menus appear automatically whenever a form is focused.
  383. To see a form layout also as a fully operational dialog, execute Open
  384. Dialog
  385. (Tool).
  386. The size of a form view can be adjusted by selecting the whole document (Select
  387. Document in menu Edit) and then dragging the graphical handles.
  388. An edited dialog can be saved by saving the window of the form layout. Oberon/F saves dialogs in the standard document format. By convention, Oberon/F forms are saved in files with names of the form "variable", in the appropriate "Rsrc" folder (-> Subsystems and Global Modules). For example, the standard "Find & Replace" dialog is stored in ":Text:Rsrc:find". A form can be opened either by opening it as a document (for layout editing), or by adding an item to one of the menus (for opening it as a dialog). Further below, examples of such menu items will be shown.
  389. Note that forms are saved in their editable state; only when they are opened via menu commands (using the pseudo commands OpenAuxDialog or OpenToolDialog, -> Menu Configuration) are they opened as auxiliary or tool dialogs. The difference between auxiliary and tool dialogs is that auxiliary dialogs are self-contained, e.g. dialogs to set up configuration parameters or data entry masks. Tool dialogs operate on windows below them, e.g. the Find
  390. Replace dialog.
  391. Control Properties Inspector
  392. The inspector is a tool used to inspect and to modify the properties of standard controls. Standard controls are push buttons, check boxes, radio buttons, fields, and captions. A field represents editable text, while a caption represents non-editable ("static") text. Usually, there is a caption for every field, but there may also be captions without fields. All controls are special views. As every view, any control can be inserted into any container, be it a text, a spreadsheet, or whatever other container is available. However, most controls are put into forms.
  393. Each control can be linked to a variable, more exactly to the field of a globally declared record variable. When the control is allocated, Oberon/F tries to link the control to its variable, using the advanced metaprogramming capabilities of the Oberon/F kernel. In this way, the link between control and variable can be built up automatically when a dialog is created or loaded, and correct linking (i.e. correct typing) can be guaranteed even after a dialog layout had been edited.
  394. Controls may take on different states at run-time. Depending on the control and on the underlying user interface, these states may be represented in visually distinct ways:
  395. enabled/disabled    only enabled controls may be modified interactively
  396.         To disable a control, its guard should call Dialog.Disable.
  397.         Controls which cannot be linked to their variable are always disabled.
  398. defined/undefined    illegal or otherwise undefined values may be hilighted as such
  399.         To mark a control as undefined, its guard should set Dialog.par.undef.
  400. normal/readOnly    controls (e.g. fields) may be denoted as read-only, i.e. under program
  401.         control only.
  402.         To mark a control as readOnly, its guard should set Dialog.par.readOnly.
  403.         Controls which are linked to read-only variables are always readOnly.
  404. Note that the above states are determined wholly at run-time, they are never externalized or internalized.
  405. All controls have the following properties, which are externalized when the controls are written to files:
  406. link    this is the name of a global variable, to which the control is linked, e.g. 
  407.     TextCmds.find.replace.
  408. label    this is the displayed string (not applicable to fields).
  409. guard    this optional command is a guard which allows to disable/enable a control
  410.     selectively.
  411. element    controls may be grouped. A control with the element property set belongs the the
  412.     group of its closest non-element predecessor. On the Macintosh, this property is
  413.     not interpreted.
  414. light font    a field may either be displayed in the standard font for this purpose, or in a more
  415.     discreet ("light") font. On the Macintosh, this property is only interpreted in fields
  416.     and captions.
  417. Additional push button properties:
  418. default    the button is activated when the user presses return or enter.
  419. cancel    the button is activated when the user presses escape.
  420. Instead of linking a push button to a variable, it can be linked to a command also, e.g. by setting link to Dialog.Beep.
  421. Additional check box properties: none
  422. Additional radio button properties:
  423. level    a radio button is "on" when the value of the variable bound to the button is equal
  424.     to level.
  425. Additional field properties: none
  426. Additional caption properties: none
  427. Menu Configuration
  428. The configurable menus can be inspected using Menus from menu Info. The displayed text can be edited, and the current menu configuration updated accordingly (Update
  429. Menus in menu Info). To make changes to the menus permanent, the menu text must be saved to disk. The file System:Rsrc:menus contains the startup menu configuration, i.e. the text which is opened when Menus is executed.
  430. The menu text consists of a sequence of menu definitions, which themselves consist of sequences of menu items. An example is the following extract of the Dev menu definition:
  431.      
  432. Each menu has a name, in this case it is Dev. Optionally, the module name can be followed by a menu type, e.g.
  433. MENU "Text" ("TextViews.ViewDesc")
  434. A typed menu is only installed in the menu bar as long as the current focus has a matching type. The other menus are always available. Standard menus,i.e. File, Edit, Font, Attributes, and Windows are predefined and not part of a menu configuration text.
  435. There are two kinds of menu items: normal items and separators. A separator optically organizes a menu into different groups of items. Normal menu items consist of four strings: a name, a keyboard shortcut, an action command, and a guard command. The name is the string presented to the user in the menu. The keyboard shortcut, which may be empty, allows to associate keyboard equivalents to the menu item. The action string contains the command sequence which is activated when the menu item is executed. The guard string, which may be empty, contains a command sequence which is called to determine whether the item is currently enabled or disabled, checked or unchecked, or to set up a current item name which overrides the normal name (e.g. to toggle between Show
  436. XYZ and Hide
  437. XYZ).
  438. Command strings such as the action or guard strings may contain a sequence of calls to parameterless exported Oberon procedures, connected by semicolons. In the above example, the command
  439. "DevCommanders.Deposit; PasteView"
  440. calls procedure Deposit of module DevCommanders. Afterwards, the pseudo-command PasteView is executed. PasteView is known to the Oberon command interpreter: it fetches a view from a global queue, and pastes it to the focus. There is a convention in Oberon/F that for every concrete view type there is a corresponding Deposit procedure, which allocates such a view and then deposits it in a global view queue (by calling Views.Deposit).
  441. The list of built-in pseudo-commands is the following:
  442. PROCEDURE PasteView
  443. Takes a deposited view from the global view queue and pastes it to the focus.
  444. PROCEDURE Open
  445. Takes a deposited view from the global view queue and opens it in a new window.
  446. PROCEDURE OpenDoc (spec: ARRAY OF CHAR)
  447. Takes a file specification of an Oberon/F document as parameter, and opens the document in a window. Parameter spec must be the path name of a file.
  448. Example:
  449. "OpenDoc('System:Rsrc:menus')"
  450. PROCEDURE OpenAuxDialog (spec, name: ARRAY OF CHAR)
  451. Takes a dialog file specification and a dialog name as parameters, and opens a dialog with the specified dialog. The dialog is opened as an auxiliary window. Parameter spec must have the form "module.variable", denoting the variable to which the dialog is bound.
  452. Example:
  453. "OpenAuxDialog('FormGen.new', 'New Form')"
  454. PROCEDURE OpenToolDialog (spec, name: ARRAY OF CHAR)
  455. Takes a dialog file specification and a dialog name as parameters, and opens a dialog with the specified dialog. The dialog is opened as a tool window. Parameter spec must have the form "module.variable", denoting the variable to which the dialog is bound.
  456. Example:
  457. "DevInspector.InitDialog; OpenToolDialog('DevInspector.inspect', 'Inspect')"
  458. PROCEDURE Unload (module: ARRAY OF CHAR)
  459. Takes a module name as parameter. It tries to unload the specified module.
  460. Example:
  461. "Unload('Myexample'); Myexample.Test; Dialog.Beep"
  462. A menu guard command tests whether its menu item should currently be disabled. If so, it calls Dialog.Disable. Several built-in guard commands are available:
  463. PROCEDURE SelectionGuard
  464. Disables menu item if there is no current selection.
  465. PROCEDURE SingletonGuard
  466. Disables menu item if there is no current selection, or if the selection doesn't encompass exactly one embedded view.
  467. PROCEDURE CaretGuard
  468. Disables menu item if there is no current caret, i.e. no selection of length 0.
  469. PROCEDURE PasteGuard
  470. Disables menu item if pasting is currently not possible.
  471. PROCEDURE PasteCharGuard
  472. Disables menu item if entering a character is currently not possible.
  473. PROCEDURE PasteLCharGuard
  474. Disables menu item if entering a long character is currently not possible.
  475. PROCEDURE PasteViewGuard
  476. Disables menu item if pasting a view is currently not possible.
  477. PROCEDURE CopyGuard
  478. Disables menu item if there is no selection, or if it cannot be copied.
  479. PROCEDURE CutGuard
  480. Disables menu item if there is no selection, or if it cannot be cut.
  481. It is possible to execute code when Oberon/F is started up: upon start-up after having loaded and initialized its core, Oberon/F tries to load module Config. The module body may perform whatever configuration tasks deemed necessary. The standard Config module simply opens the Log window.
  482. String Resources
  483. String resources are files which define a mapping between strings, e.g. the string "untitled" may be mapped to "sans titre". This is useful to prevent hard-wiring textual messages in the program code, in order to make later editing of these messages possible without requiring a recompilation. From a programming point of view, string translation is done in several procedures of module Dialog, e.g. Dialog.MapString. String resource files can be normal Oberon/F text documents, which simply consist of the keyword STRINGS followed by a sequence of lines; each line contains a string (the key), a TAB, another string (to which the key is mapped), and a carriage return, e.g.
  484. STRINGS
  485. untitled    sans titre
  486. open    ouvre
  487. close    ferme
  488. Subsystems and Global Modules
  489. A potential problem for any dynamically extensible system is the name space pollution problem of extensions: if two vendors would sell different extensions to Oberon/F, but under the same name, a conflict could arise: the two extensions could not be used on the same machine at the same time, since Oberon/F wouldn't know which was which.
  490. It is possible to resolve such a conflict by appropriate renaming; however this requires that all clients of the renamed extension are updated accordingly; often an impossible task.
  491. A better solution is to avoid conflicts right from the start, by giving extensions globally unique names. This can be done by providing a central registration service for all extensions, in this case for all Oberon/F modules. To reduce the administrative overhead of such a solution, Oberon microsystems opted for a two-level strategy: Oberon microsystems only registers subsystem names for a small fee, guaranteeing that such a name hasn't been registered yet. The buyer of a subsystem name should then guarantee that no two modules in this subsystem have the same name, where subsystem simply means a collection of modules. Typically, a subsystem also corresponds to a project.
  492. This strategy is realized by a naming convention: every module name may contain a subsystem name as prefix, e.g. TextModels and TextViews belong to subsystem Text. The subsystem name begins with the first letter of the module name, and ends at the transition of a lower case letter (or digit) to an upper case letter. If no such transition exists, e.g. as in Files or Views, the module is called a global module, and belongs to the default subsystem called System. Global module names are reserved by Oberon microsystems. However, global module names may also be used by anyone for modules which are not meant to be published, i.e. where module name clashes can be resolved locally (e.g. when doing strictly in-house development and use of software) or where they are not critical (e.g. in a teaching environment).
  493. This naming convention is technically supported by Oberon/F in that its compiler, linker, loader, and other development tools use subsystem names to determine where to fetch (or put) symbol files (or code files), as well as documentation and resource files. In the Oberon/F folder, there is one folder for every subsystem. The standard subsystems are Dev, Form, Host, Mac, Omosi, Samples, Std, System, and Text. The folder names must be identical to the subsystem names. A typical subsystem folder itself contains five folders: Code, Docu, Mod, Rsrc, and Sym.
  494. - the Code folder contains the code files of all modules in the subsystem, one file per module
  495. - the Docu folder may contain a programmer's reference for several or all modules in the subsystem, one file per module
  496. - the Mod folder may contain the sources for several or all modules in the subsystem, one file per module
  497. - the Rsrc folder may contain data files ("resources") for the whole subsystem, currently these are mostly strings files, one per subsystem; and possibly some files containing forms.
  498. - the Sym folder contains the symbol files for several or all modules in the subsystem, one file per module
  499. The Oberon compiler consumes program sources (usually the one displayed in the top window) and symbol files. A symbol file for module SubsystemModule is looked up as Subsystem:Sym:Module. The code file produced by the compiler is registered as Subsystem:Code:Module.
  500. The browser (i.e. Interface) looks up a symbol file for SubsystemModule as Subsystem:Sym:Module.
  501. The reference tool (i.e. Source and Documentation) look up as Subsystem:Mod:Module, and as Subsystem:Docu:Module, respectively.
  502. Note that files are only looked up, but not searched: a file's location is strictly determined by the module name (including the subsystem prefix) and by the kind of file to be looked up. If the file isn't at the expected location, lookup fails; no further search is performed.
  503. The only exception to this rule occurs with global modules. Their code files are always placed in the Code folder in the Oberon/F folder. Their symbol files are always placed in the Sym folder in the Oberon/F folder. However, if the lookup of either a code or a symbol file of a global module fails, another attempt is made to open the file in System:Code or System:Sym, respectively.
  504. If one of the development tools tries to register a file (e.g. a symbol file) in a folder which doesn't exist, it places the file in the next existing folder further up in the folder hierarchy, i.e. possibly in the Oberon/F folder itself.
  505. Distribution
  506. If you develop add-on components (i.e. new subsystems) for Oberon/F, distribution simply means to distribute your subsystem folder(s). You may not want to distribute the source texts in order to protect your intellectual property rights, then you should delete them from the distribution version. You may not want to make one or several of your module interfaces public, or none at all if your application is not meant to be extensible. In this case, you should delete the symbol files in question. What you are distributing is exactly one subsystem folder.
  507. On the other hand, if you want to distribute not only an add-on component but rather a whole stand-alone application for some reason, you should follow the steps outlined below:
  508. 1) Make a copy of your complete Oberon/F folder, which should contain the completely functional application. Perform the following steps only on this copy!
  509. 2) Delete the Dev folder. It is not permitted to distribute this folder or any part thereof.
  510. 3) Delete all the documentation and examples provided by Oberon microsystems, i.e. the Demo, Read
  511. Me, and Welcome files, and the folders Manuals, Omosi, Omosi
  512. Docs, Samples, Tutorials, Form:Docu, System:Docu, and Text:Docu.
  513. 4) Delete all source files (located in the various Mod folders) of modules whose
  514. implementations you don't want to pulish.
  515. 5) Delete all symbol files (located in the various Sym folders) of modules whose interfaces you don't want to publish. This may or may not encompass the standard Oberon/F modules. If your application is not meant to be extensible, we recommend that you delete all symbol files.
  516. Now you may continue on either of two possible paths. In the first case, which is more suited for extensible applications, you provide the unlinked code files of your application and of Oberon/F, together with a minimal linked application (Oberon/X) to boot the whole software system. In the second case, which may be more suited for closed applications, you link everything (your code files as well as the Oberon/F code) into one large application, and remove all symbol files.
  517. Unlinked:
  518. 6) Delete the Oberon/F application. This application has the development system linked in. Therefore it is not permitted to distribute it!
  519. 7) Rename the Oberon/X application to whatever name is appropriate for your application.
  520. 8) Edit the About text in the System:Rsrc folder in an appropriate way.
  521. 9) Edit the menus text in the System:Rsrc folder in an appropriate way.
  522. Linked:
  523. 6) Link your code files with the Oberon/F code files into a single application. See the documentation "Oberon/F, Macintosh, Platform-Specific Issues" for details.
  524. 7) Delete the Oberon/X application.
  525. 8) Delete the Oberon/F application. This application has the development system linked in. Therefore it is not permitted to distribute it!
  526. 9) Edit the About text in the System:Rsrc folder in an appropriate way.
  527. 10) Edit the menus text in the System:Rsrc folder in an appropriate way.
  528. 11) Delete everything else, except the Form, Host, Std, System, and Text folders with their respective Rsrc folders. Their other folders (Code, Docu, Sym) can be deleted! If you would delete also their Rsrc folders, the application would still operate (kind of), but lose all string mappings, all customized dialog layouts, and all custom menus.
  529. How to Develop Oberon/F Components
  530. This section gives an overview of the typical way how new Oberon/F components are developed. It summarizes the most important aspects of what has been said in the previous chapters.
  531. In a first step, a subsystem name (-> Subsystems and Global Modules) for the project is chosen, and a suitable folder created (with its Code, Docu, Mod, Rsrc, and Sym folders). This folder must be in the Oberon/F folder itself, i.e. at the same location where the System, Host, etc. folders are. Note that there are no environment variables or path name lists in Oberon/F. File lookup is static and determined by module names, not by configurable search paths or similar constructs.
  532. It is helpful to set up a text document which contains the names of all the subsystem's modules, starting with the one lowest in the module hierarchy. Such a tool text can be used as input to the Open
  533. Module
  534. List command. This command opens the source file of the module whose name is selected. This is convenient since it can much reduce the need to navigate through the folder hierarchy that would otherwise be necessary with the Open... command. As a mnemonic aid, the keyboard shortcut for Open
  535. Module
  536. List is the digit "0", while the keyboard shortcut of the Open... command is the letter "O". Open
  537. Module
  538. List is even more useful since it allows to open several files at the same time, if the selection includes several module names.
  539. If you have preferred fonts or rulers for programming, you may want to set up a stationary pad. For that purpose, create a document with set up accordingly, save it under the stationary name, and then use the Finder's Get
  540. Info command to turn the file into a stationary.
  541. Now you are ready to create the module sources, which should be placed in your subsystem's Mod folder. In order to take advantage of autoindentation, you should use tab characters for indentation. You can directly compile the module on which you are working with the Compile command. This command compiles, but does not yet load, the module. The command Compile
  542. Module
  543. List takes a list of module names and compiles them all.
  544. In order to load the module, you can execute one of its exported parameterless procedures, either by executing the Execute menu command on the command's name (e.g. on Dialog.Beep), or you can augment your tool text with commanders, e.g. 
  545.  Dialog.Beep (call Insert
  546. Commander). Once loaded, a module remains loaded, unless you explicitly unload it. Unloading can be done by calling Unload on the module source (working on the focus view, as does Compile), or by selecting a module name and calling Unload
  547. Module
  548. List (which also works on a sequence of module names, similar to Compile
  549. Module
  550. List). Note that modules must be unloaded from top to bottom, since only modules which are not imported anymore may be unloaded. To check this, you may call Loaded
  551. Modules. For the unloading of such modules, there is a shortcut if you used commanders: option-click on the commander first unloads the old version of the module, then loads the new version, and then calls the procedure.
  552. In order to get quick access to a module's definition or documentation, you can use the commands Interface (resp. Documentation). Interface calls the browser to construct a definition text out of a module's symbol file. Note that in this text you can select further module names (or names of imported constants, variables, types, or procedures) and get the interface of those by calling the same command again. If there is a documentation file available for a module, you can execute Documentation after selecting the module's name. This command opens the documentation text. If you have selected not only the module name (e.g. Views) but an object of this module (e.g. Views.Broadcast), the command tries to find the first occurence of the object's name which is written in boldface. The name is selected, and the window scrolls to the selection's position. In the rare cases where this first occurence is not the one you need, you may call Find
  553. Again to search the next occurence.
  554. In order to test a module, you can use module Out to write debugging output into the Log window. In order to set breakpoints, you can introduce HALT statements and recompile the module. The trap text which is opened when the HALT is reached gives you information about the call chain (stack) as it has been at the moment the command was interrupted. Note that at no point in time the normal Oberon/F environment is left, debugging takes place completely inside Oberon/F.
  555. It is recommended to check preconditions and important invariants systematically in all programs, using the ASSERT statement. This debugging strategy is called static debugging, since error conditions are specified statically (even though they may be checked only at run-time). In an object-oriented environment, where the control flow tends to become too convoluted to follow step-by-step, the consequent application of assertions proves to keep debugging times shorter than any interactive debugging ever could.
  556. Besides code, Oberon/F programs may also include resources. In the resource folder of a subsystem, there may be files for dialog layouts and for string mappings. Furthermore, there is a global menu configuration text. The latter can be opened with command Menus, edited, and then made the current configuration by calling Update
  557. Menus. A menu item may not only have an action command, but also a guard command. Guards mainly determine whether a menu item is currently enabled or disables. If a guard cannot be executed (e.g. because its module cannot be loaded), a "?" appears in front of the item's name, and the item is disabled. It is never attempted again to execute the guard command, unless explicitly requested, by calling Flush
  558. Resources. The same command also flushes an internal cache of string mappings, i.e. it should also be called after a strings resource file has been changed.
  559. Dialogs are linked to global program variables. A new dialog is created by typing in the variable's name in the New
  560. From dialog. The new dialog has a default layout, which can be modified interactively. Then the dialog should be stored, using the variable's name as file name (e.g. find for variable TextCmds.find) in the subsystem's resource folder. The properties of a dialog element (a control) can be inspected and modified using the Control
  561. Properties command.
  562. Distribution of an Oberon/F component simply consists of distributing its subsystem folder. Installation simply consists of copying a subsystem folder into the Oberon/F folder. If it is desired to link one or several subsystems together with an Oberon/F core, a linker can be used (-> Oberon/F, Macintosh, Platform-Specific Issues).
  563. Standard Commands
  564. In this section, the menu items of the standard menus File, Edit, Font, Attributes, and Windows are described. For a menu item which is not permanently enabled, the condition for enabling it is specified.
  565. File Menu
  566. Opens a new document window containing an empty text view.
  567. Open...
  568. Opens a modal file selection dialog. Only Oberon/F documents are shown (i.e. Macintosh files with file type = "oODC"). If the option key was held down while clicking on the menu bar, Open Any... appears. This command behaves the same way as Open..., except that all files are shown in the standard file dialog, regardless of their types.
  569. Close
  570. Enabled: front window
  571. Closes the front window. If the window is a primary document window and its contents has been modified ("dirty"), the user is asked whether to save the window's contents in a file.
  572. Enabled: dirty front document window
  573. Saves the front window's contents to a file. If the window's contents has not yet been saved to a file, the user is asked for a file name.
  574. Save As
  575. Enabled: front window
  576. Saves the front window's contents to a file. The user is always asked for a file name.
  577. Page Setup...
  578. Enabled: front window
  579. Asks the user for the page information of the front window's document, for later printing.
  580. In addition to the data which is specific to the current printer driver, the margins can be set (the distances between the paper's edges and the printed area), and a standard header can be switched on or off. The standard header consists of a page number and a date.
  581. Note: when using LaserWriter 7.x.y drivers, you should switch on greyscale printing (not black/white), otherwise printing may produce entirely black pages. If possible, switch to LaserWriter 8.x.y drivers, which don't have this bug.
  582. Print...
  583. Enabled: front window
  584. Asks the user for printing information, and then creates a print-out accordingly.
  585. Print Selection...
  586. Enabled: singleton in front window
  587. Asks the user for printing information, and then creates a print-out accordingly. Only the selection is printed. This command corresponds to the sequence Copy/Paste To New Window/Print...
  588. Terminates the application. If windows with modified contents are open, the user is asked whether to save them in files.
  589. Edit Menu
  590. Undo [...]
  591. Enabled: non-empty undo stack of operations
  592. Reverses the effect of the most recent modifying operation. Usually, the kind of operation is given behind the word "Undo", e.g. Undo
  593. Paste.
  594. Redo [...]
  595. Enabled: non-empty redo stack of operations
  596. Restores the effect of the most recently undone operation. Usually, the kind of operation is given behind the word "Redo", e.g. Redo
  597. Paste.
  598. Enabled: selection in focus view in front window
  599. Deletes the selection and puts a copy into the clipboard.
  600. Enabled: selection in focus view in front window
  601. Puts a copy of the selection into the clipboard.
  602. Paste
  603. Enabled: caret in focus view in front window, non-empty clipboard
  604. Pastes a copy of the clipboard's contents at the caret position. If the focus view contains the same kind of data as the clipboard, the data is inserted directly into the focus view's data. Otherwise, and if the focus view is a container, a copy of the whole view containing the clipboard data is inserted into the focus view's data.
  605. Clear
  606. Enabled: selection in focus view in front window
  607. Deletes the selection, without putting it into the clipboard.
  608. Paste Object
  609. Enabled: caret in focus view in front window, non-empty clipboard
  610. Pastes a copy of the clipboard's contents at the caret position. If the focus view is a container, a copy of the whole view containing the clipboard data is inserted into the focus view's data.
  611. Paste To New Windows
  612. Enabled: non-empty clipboard
  613. Opens a copy of the clipboard's contents into a new document window.
  614. Select Document
  615. Enabled: front window
  616. Selects the root view of the front window's document as a singleton. Note the difference to Select
  617. All, which selects the latter's contents instead (or rather the contents of whatever view is currently the focus).
  618. Select All
  619. Enabled: selectable focus view in front window
  620. Selects the whole focus view's contents.
  621. Font Menu
  622. Available: font-carrying selection or caret in focus view in front window
  623. This menu lists all the fonts which are currently available. The menu item for the caret's font, or the font of the selection if it is homogeneous, is checked.
  624. Attributes Menu
  625. Available: style/size/color-carrying selection or caret in focus view in front window
  626. The following commands work on the selection; if there is no selection, the caret's current attributes are affected instead. These attributes are used as defaults when typing in new text.
  627. For colors, there is a system-wide color (default color) which can be modified by the user. Everything drawn in this color will be updated accordingly.
  628. Plain
  629. Enabled: style-carrying selection or caret in focus view in front window
  630. Checked: if text to the left and to the right of the caret is plain, or if selection is homogeneously plain (i.e. non-bold, non-italicized, non-underlined, and non-striked-out)
  631. Removes all style attributes (bold, italic, underline, strikeout) from the selection.
  632. Enabled: style-carrying selection or caret in focus view in front window
  633. Checked: if text to the left and to the right of the caret is bold, or if selection is homogeneously bold.
  634. If the selection is homogeneously bold, it is made non-bold, otherwise it is made bold.
  635. Italic
  636. Enabled: style-carrying selection or caret in focus view in front window
  637. Checked: if text to the left and to the right of the caret is italic, or if selection is homogeneously italic.
  638. If the selection is homogeneously italic, it is made non-italic, otherwise it is made italic.
  639. Underline
  640. Enabled: style-carrying selection or caret in focus view in front window
  641. Checked: if text to the left and to the right of the caret is underlined, or if selection is homogeneously underlined.
  642. If the selection is homogeneously underlined, it is made non-underlined, otherwise it is made underlined.
  643. Strikeout
  644. Enabled: style-carrying selection or caret in focus view in front window
  645. Checked: if text to the left and to the right of the caret is striked out, or if selection is homogeneously striked out.
  646. If the selection is homogeneously striked out, it is made non-striked-out, otherwise it is made striked out.
  647. 9 point, 10, 12, 16, 20, 24
  648. Enabled: size-carrying selection or caret in focus view in front window
  649. Checked: if text to the left and to the right of the caret has the given size, or if the selection is homogeneously of the given size
  650. The selection is set to the given point size.
  651. Other Size...
  652. Enabled: size-carrying selection or caret in focus view in front window
  653. Checked: if none of the other sizes apply
  654. A tool dialog is opened, which allows to enter a particular font size in points, and then to set the selection to this size.
  655. Default
  656. Enabled: color-carrying selection or caret in focus view in front window
  657. Checked: if text to the left and to the right of the caret has the default color, or if the selection is homogeneously of the default color
  658. Sets the selection's color to the default color.
  659. Black
  660. Enabled: color-carrying selection or caret in focus view in front window
  661. Checked: if text to the left and to the right of the caret is black, or if the selection is homogeneously black
  662. Sets the selection's color to black.
  663. Enabled: color-carrying selection or caret in focus view in front window
  664. Checked: if text to the left and to the right of the caret is red, or if the selection is homogeneously red
  665. Sets the selection's color to red.
  666. Green
  667. Enabled: color-carrying selection or caret in focus view in front window
  668. Checked: if text to the left and to the right of the caret is green, or if the selection is homogeneously green
  669. Sets the selection's color to green.
  670. Enabled: color-carrying selection or caret in focus view in front window
  671. Checked: if text to the left and to the right of the caret is blue, or if the selection is homogeneously blue
  672. Sets the selection's color to blue.
  673. Other Color...
  674. Enabled: color-carrying selection or caret in focus view in front window
  675. Checked: if none of the other colors apply
  676. Asks the user for a color, to which it then sets the selection.
  677. Set Default...
  678. Enabled: color-carrying selection or caret in focus view in front window
  679. Asks the user for a color, to which it then sets the default color.
  680. Windows Menu
  681. New Window
  682. Enabled: front window
  683. Opens a new window on the same document as the front window. The window is of the same kind as the front window. The window's title is put between "(" and ")" parentheses.
  684. Open As Window
  685. Enabled: focus view in front window, document in front window is not viewer
  686. Opens a new window on the front window's focus view. The window is an auxiliary window. The window's title is put between "(" and ")" parentheses.
  687. Tile Horizontal
  688. Arrange windows from left to right in a non-overlapping fashion. This command does not affect non-resizable windows, and it ignores some windows when there are too many open windows for a reasonable tiling. The front window becomes the left-most window.
  689. Tile Vertical
  690. Arrange windows from top to bottom in a non-overlapping fashion. This command does not affect non-resizable windows, and it ignores some windows when there are too many open windows for a reasonable tiling. The front window becomes the top-most window.
  691. Stack
  692. Arrange windows on top of each other. This command does not affect non-resizable windows, and it ignores some windows when there are too many open windows for a reasonable stacking. The front window remains front window.
  693. Show Clipboard / Hide Clipboard
  694. If the clipboard is open, it closes it and all its secondary windows. Otherwise it opens a clipboard window.
  695. windows
  696. Here the list of open windows is appended, the front window at the top (checked). Document window titles are in boldface if their contents has been modified.
  697. Custom Commands
  698. The other menus can be configured freely with commands of your choice. The configuration file resides in the folder System:Rsrc under the name menus (-> "Menu Configuration"). In this text, you can assemble the commands of your choice. For distribution purposes however, you may not use any of the Dev subsystem's commands.
  699. Instead of describing the default menu configuration for development purposes, a list of all available commands is given here, sorted by the modules which provide these commands.
  700. Commands which don't appear in the list below are private, and only used internally.
  701. Controls
  702. Controls are special views which usually appear in dialogs: buttons, checkboxes, etc. In Oberon/F, buttons are typically linked to fields of a record variable. Exceptions are "simple" buttons which directly contain an Oberon command as their link. Use DevInspector to inspect and modify the properties of a control.
  703. CloseDialog
  704. This procedure only works as command in a simple push button.  It closes the window in which the push button appears.
  705. DepositCancelButton
  706. Deposits a cancel button. Cancel buttons react to escape characters. They are simple push buttons which call Controls.CloseDialog.
  707. DepositCaption
  708. Deposits a caption, i.e. a text message which cannot be edited.
  709. DepositCheckBox
  710. Deposits a check box.
  711. DepositField
  712. Deposits a field for editable text.
  713. DepositPushButton
  714. Deposits a push button.
  715. DepositRadioButton
  716. Deposits a radio button.
  717. DevAlienTool
  718. Alien views are views which, for some reason, cannot be loaded correctly. The reason may be a programming error, e.g. a different number of bytes is read than was written, or it may be a version problem (an unknown version was detected). Usually however, the problem is that some code for the view cannot be loaded, because it is missing or inconsistent. The alien tool helps to analyze such problems.
  719. Analyze
  720. Guard: DevAlienTool.SingletonGuard
  721. This command analyzes the singleton alien view, and opens a window with the textual analysis.
  722. SingletonGuard
  723. This guard disables the current menu item if the current front singleton isn't an alien view.
  724. DevBrowser
  725. ShowInterface
  726. Guard: SelectionGuard
  727. If a module name is selected, this command shows the complete definition of the module. If a qualident is selected, only the definition of the corresponding item is shown.
  728. DevCmds
  729.     log: RECORD (Dialog.Interactor)
  730.         alerts, reports: BOOLEAN;
  731.         Set: PROCEDURE
  732. This is the interactor for the Log
  733. Settings dialog. alerts determines whether messages created with the DevLog routines (or Out) are written to the log or presented in dialogs. reports determines whether error messages issued during the internalization of a store should be presented to the user or not.
  734. ClearLog
  735. Clears the log text.
  736. FlushResources
  737. Flush menu guard and string translation resources.
  738. InitLogDialog
  739. Initialization command for the Log
  740. Settings dialog.
  741. OpenLog
  742. Opens a log window if none is open, otherwise it brings the log window to the top.
  743. OpenModuleList
  744. Guard: TextCmds.SelectionGuard
  745. Opens the modules whose names are selected.
  746. DevCommanders
  747. Deposit
  748. Deposit command for commanders.
  749. DevCompiler
  750. Compile
  751. Guard: TextCmds.FocusGuard
  752. Compile the module whose source is in the focus view.
  753. CompileList
  754. Guard: TextCmds.SelectionGuard
  755. Compile the list of modules whose names are selected. When the first error is detected, the offending source is opened to show the error.
  756. CompileSelection
  757. Guard: TextCmds.SelectionGuard
  758. Compile the module, whose beginning is selected.
  759. DevDebug
  760. Execute
  761. Guard: TextCmds.SelectionGuard
  762. Execute the string (between quotation marks), which must have the form of an Oberon command sequence, e.g. "Dialog.Beep; Dialog.Beep". For simple commands, the string delimiters may be omitted, e.g. Dialog.Beep.
  763. ShowCommands
  764. Guard: TextCmds.SelectionGuard
  765. Show the commands (parameterless exported procedures) of the module whose name is selected.
  766. ShowGlobalVariables
  767. Guard: TextCmds.SelectionGuard
  768. Show the global variables (parameterless exported procedures) of the module whose name is selected.
  769. ShowLoadedModules
  770. Show the list of all loaded modules.
  771. ShowLoadedTopModules
  772. Show the list of loaded top modules, i.e. of modules which are not imported by other modules. This command can be convenient to determine the modules which should be linked together when building an application (all depending modules are linked in automatically).
  773. ShowResources
  774. Show the current use of resources such as heap space and open file access paths.
  775. Unload
  776. Guard: TextCmds.FocusGuard
  777. Tries to unload the module whose source is in the focus view. Unloading fails if the specified module is not loaded yet, or if it is not a top module.
  778. UnloadModules
  779. Guard: TextCmds.SelectionGuard
  780. Tries to unload a list of modules whose names are selected. Unloading may partially or completely fail if one of the specified modules is not loaded yet, or if it is still being importet by at least one client module. Modules must be unloaded from top to bottom.
  781. DevMarkers
  782. NextError
  783. Guard: TextCmds.FocusGuard
  784. Move caret forward after the next error marker. If there is none, the text is scrolled to the beginning.
  785. ToggleCurrent
  786. Guard: TextCmds.FocusGuard
  787. Toggle the state of the marker before the caret.
  788. UnmarkErrors
  789. Guard: TextCmds.FocusGuard
  790. Removes all error markers.
  791. DevInspector
  792. The inspector makes it possible to inspect and modify properties of a control. Currently five types of controls are supported: push buttons, check boxes, radio buttons, and text fields.
  793.     inspect: RECORD (Dialog.Interactor)
  794.         control-: Dialog.String;
  795.         label: ARRAY 40 OF CHAR;
  796.         link, guard: Dialog.String;
  797.         element, default, cancel: BOOLEAN;
  798.         level: INTEGER;
  799.         lightFont: BOOLEAN;
  800.         GetNext, Set: PROCEDURE
  801. This is the interactor for the Control
  802. Properties dialog. It presents the various control properties of a singleton.
  803. FormCmds
  804. AlignBottom
  805. Guard: FormCmds.SelectionGuard
  806. Move all selected views such that their bottom sides are aligned to the bottommost view in the selection.
  807. AlignLeft
  808. Guard: FormCmds.SelectionGuard
  809. Move all selected views such that their left sides are aligned to the leftmost view in the selection.
  810. AlignRight
  811. Guard: FormCmds.SelectionGuard
  812. Move all selected views such that their right sides are aligned to the rightmost view in the selection.
  813. AlignToColumn
  814. Guard: FormCmds.SelectionGuard
  815. Move all selected views such that their horizontal centers become aligned vertically.
  816. AlignToRow
  817. Guard: FormCmds.SelectionGuard
  818. Move all selected views such that their vertical centers become aligned horizontally.
  819. AlignTop
  820. Guard: FormCmds.SelectionGuard
  821. Move all selected views such that their top sides are aligned to the topmost view in the selection.
  822. DuplicateView
  823. Guard: FormCmds.SingletonGuard
  824. This command makes a copy of the current front focus singleton, and inserts it close the the original.
  825. FocusGuard
  826. This guard disables the current menu item if the current front focus isn't a form view.
  827. ForceToGrid
  828. Guard: FormCmds.FocusGuard
  829. Moves all views in the focus form such that their top-left corners come to lie on the grid.
  830. SelectOffGridViews
  831. Guard: FormCmds.FocusGuard
  832. Selects all views in the focus form whose top-left corners don't lie on the grid.
  833. SelectionGuard
  834. This guard disables the current menu item if the current front focus isn't a form view, or if it doesn't contain a selection
  835. SingletonGuard
  836. This guard disables the current menu item if the current front focus isn't a form view, or if it doesn't contain a singleton.
  837. HostCmds
  838. VAR allocator: Dialog.String
  839. This string containers the allocation command executed when New is invoked. By default, it is set to"TextViews.Deposit; Open".
  840.     size: RECORD (Dialog.Interactor)
  841.         size: LONGINT;
  842.         Set: PROCEDURE
  843. This is the interactor for the Other
  844. Size dialog.
  845. ContainerGuard
  846. This guard disables the current menu item if the current focus is not a container view.
  847. RecalcFocusSize
  848. Lets the current focus recalculate its preferred size and asks the container of the focus to accept this size, if possible.
  849. ToggleNoFocusGuard
  850. This guard disables the current menu item if the focus cannot be toggled between editor and layout mode.
  851. ToggleNoFocus
  852. Toggles the focus between editor and layout mode.
  853. StdClocks
  854. Deposit
  855. Deposit command for standard clocks.
  856. StdControlCmds
  857. MakeField
  858. Guard: SingletonGuard
  859. Tries to change the singleton into a field control. This works on radio buttons.
  860. MakePushButton
  861. Guard: SingletonGuard
  862. Tries to change the singleton into a push button control.
  863. MakeRadioButton
  864. Guard: SingletonGuard
  865. Tries to change the singleton into a radio button control. This works on number fields.
  866. MakeCaption
  867. Guard: SingletonGuard
  868. Tries to change the singleton into a caption. This works on text fields.
  869. SetCancelButton
  870. Guard: ContainerGuard
  871. Cancel buttons react on the input of escape characters. This command removes the cancel property from the current cancel button in the focus container, if there is one. If a singleton push button is selected, it then sets this button's cancel property.
  872. SetDefaultButton
  873. Guard: ContainerGuard
  874. Default buttons react on the input of carriage
  875. return and enter characters. This command removes the default property from the current default button in the focus container, if there is one. If a singleton push button is selected, it then sets this button's default property.
  876. StdMenuTool
  877. UpdateMenus
  878. Guard: TextCmds.FocusGuard
  879. This command takes the focus text and interprets it as a menu configuration. If it contains syntax errors, the error is selected, otherwise the current menu configuration is updated appropriately.
  880. Menus
  881. Shows the current menu configuration text.
  882. StdStamps
  883. Deposit
  884. Deposit command for standard stamps.
  885. TextCmds
  886.     find: RECORD (Dialog.Interactor)
  887.         find: ARRAY 256 OF CHAR;
  888.         replace: ARRAY 256 OF CHAR;
  889.         ignoreCase, wordBeginsWith, wordEndsWith: BOOLEAN;
  890.         FindNext, FindFirst, Replace, ReplaceAndFindNext, ReplaceAll: PROCEDURE
  891. This is the interactor for the Find
  892. Replace dialog. It allows to specify several options: ignoreCase makes searching insensitive to case, wordBeginsWith restricts searching to the beginning of words, and wordEndsWith restricts searching to the end of words.  wordBeginsWith and wordEndsWith together restrict searching to whole words.
  893. FindAgain
  894. Guard: TextCmds.FindAgainGuard
  895. This command searches for the currently selected text string, starting from the end of the selection. If there is no selection, it searches for the most recently used search string of Find and FindAgain, starting from the caret position.
  896. FindAgainGuard
  897. This guard disables the current menu item if there is no current text selection, and if no string was searched previously, with Find or FindAgain.
  898. FocusGuard
  899. This guard disables the current menu item if the current focus is not a text view.
  900. InitFindDialog
  901. This initialization command sets up the TextCmds.find interactor with the current text selection.
  902. InsertDigitSpace
  903. Guard: PasteCharGuard
  904. Pastes a digit space, i.e. a space which has the same width as a digit. Whether a digit space has this defined width depends on the font used; some fonts have digits of varying widths.
  905. InsertNBHyphen
  906. Guard: PasteCharGuard
  907. Pastes a non-breaking hyphen.
  908. InsertNBSpace
  909. Guard: PasteCharGuard
  910. Pastes a non-breaking space, i.e. a space which cannot be used to break a word.
  911. InsertParagraph
  912. Guard: PasteCharGuard
  913. Pastes a paragraph character.
  914. InsertRuler
  915. Guard: PasteViewGuard
  916. Pastes a new ruler, which is set up the same way as the ruler in the same text closest above. If there is no ruler above, the values of the default ruler are taken.
  917. InsertSoftHyphen
  918. Guard: PasteCharGuard
  919. Pastes a soft hyphen, i.e. a hyphen which only becomes visible if it is used to break a word.
  920. ListAlienViews
  921. Guard: TextCmds.FocusGuard
  922. Opens a text containing the list of alien views contained in this text.
  923. MakeDefaultAttributes
  924. Guard: TextCmds.SelectionGuard
  925. Sets the focus text's default attributes to the ones of the current selection in this text.
  926. MakeDefaultRuler
  927. Guard: SingletonGuard
  928. Sets the focus text's default ruler values to the ones of the currently selected ruler in this text.
  929. SelectionGuard
  930. This guard disables the current menu item if the current focus is not a text view or doesn't contain a selection.
  931. ShiftLeft
  932. Guard: TextCmds.SelectionGuard
  933. This command removes one tab character from the white space at the beginning of each line spanned by the current selection.
  934. ShiftRight
  935. Guard: TextCmds.SelectionGuard
  936. This command inserts one tab character from the white space at the beginning of each line spanned by the current selection.
  937. Subscript
  938. Guard: TextCmds.SelectionGuard
  939. This command moves the selected text up vertically, into a superscript position.
  940. Superscript
  941. Guard: TextCmds.SelectionGuard
  942. This command moves the selected text down vertically, into a subscript position.
  943. ToggleMarks
  944. Guard: TextCmds.ToggleMarksGuard
  945. This command makes text rulers and paragraph characters visible if they aren't, and hides them if they are.
  946. ToggleMarksGuard
  947. This guard disables the current menu item if the current focus isn't a text view. Furthermore it sets up the correct string of the item (Show
  948. Marks / Hide
  949. Marks).
  950. TextRulers
  951. Deposit
  952. Deposit command for text rulers.
  953. Geneva
  954. Documents.ControllerDesc
  955.